<template>
  <div class="home-banner">
    <xtx-carousel :sliders='sliders'/>
  </div>
</template>

<script>
import {findBanner} from '@/api/home'
import { onMounted, ref } from 'vue'
export default {
  name: 'HomeBanner',
  setup(props) {
    const sliders = ref([])
    onMounted( async () => {
      const { result } = await findBanner() 
      sliders.value = result
    })
    return { sliders }
  }
}
</script>

<style scoped lang="scss">
.home-banner {
  // width: 1240px;
  height: 500px;
  width: 100%;
  position: absolute;
  left: 0;
  top: 0;
  z-index: 98
}
</style>